import React from 'react';

interface props {
  houses: {
    id: string;
    imgs: {url: string}[];
    title: string;
    info: string;
    price: string;
  }[];
  housesLoading : boolean;
}

export default function({ houses,housesLoading }: props) {
  return (
    <div className="hot">
      <h1>最热名宿</h1>
      <div className="hot-lists">
        {!housesLoading &&  houses.map(item => (
          <div className="hot-lists-item" key={item.id}>
            <img src={item?.imgs[0]?.url} className="img" />
            <div className="title">{item.title}</div>
            <div className="info">{item.info}</div>
            <div className="price">￥{item.price}</div>
          </div>
        ))}
      </div>
    </div>
  );
}
